<?php
//charset=utf-8为了保证不乱码
header('Content-type:text/json;charset=utf-8');
$conn = mysqli_connect("127.0.0.1","root","","canting");
//'set NAMES utf8'为了保证不乱码
mysqli_query($conn, 'set NAMES utf8');
$sql = "select * from Menus";
$result = mysqli_query($conn,$sql);
$data =  array();
while ($re = mysqli_fetch_array($result,MYSQLI_ASSOC)) {
	$data[$re["menu_name"]] = $re;
}
//JSON_UNESCAPED_UNICODE为了保证不乱码
echo json_encode($data,JSON_UNESCAPED_UNICODE);